package com.oyjd.fw.tool.util;

import java.io.File;

public class RemoveSVN {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String path = "E:/yiyang_pro/YYfoss/Trunk/04code/server";
		remove(new File(path));
	}

	public static void remove(File file) {
		for (File f : file.listFiles()) {
			if (f.isDirectory()) {
				if (f.getName().equals(".svn")) {
					removeFolder(f);
				} else {
					remove(f);
				}
			}
		}
	}

	public static void removeFolder(File file) {
		for (File f : file.listFiles()) {
			if (f.isFile()) {
				System.out.println(f.getPath());
				f.delete();
			} else {
				removeFolder(f);
			}
		}
		System.out.println(file.getPath());
		file.delete();
	}

}
